lexer grammar Hobbes2008;
options {
  language=Java;

}
@members { 
  protected void mismatch(IntStream input, int ttype, BitSet follow) 
    throws RecognitionException { 
    throw new MismatchedTokenException(ttype, input); 
  } 
  public void recoverFromMismatchedSet(IntStream input, RecognitionException e, BitSet follow) 
    throws RecognitionException { 
    throw e; 
  } 
  public void recover(RecognitionException re) {
    throw new RuntimeException(re);
  }
}
@header {
package edu.calvin.djs32.cs214.interpreters.frontend;

}

// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 47
fragment
NUMBER : '0'..'9';
// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 49
fragment
HEXDIGIT:(NUMBER)|(('a'..'f')|('A'..'F'));
// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 51
fragment

SIGN	:	('+'|'-');	

// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 55
INTEGER 	:	((SIGN)? (NUMBER)+)|((SIGN)? '0x'(HEXDIGIT)(HEXDIGIT)(HEXDIGIT)(HEXDIGIT));

// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 57
WHITESPACE
                : (' '|'\t'|'\n'|'\r')
                { skip(); }
                ;
                
// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 62
COMMENTS
                : ((('/*').*('*/'))|(('//').*('\n'))) 
                { skip(); }
                ;
                
// $ANTLR src "C:\Documents and Settings\Derek\workspace\CS214\CS 214 Interpreters\src\edu\calvin\djs32\cs214\interpreters\frontend\Hobbes2008.g" 67
STRING 	:	('\'')~('\'')*('\'');
                


